package com.go.where.manager.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.go.where.manager.dao.CustomerFeedbackDao;
import com.go.where.manager.page.Pagination;
import com.go.where.manager.pojo.CustomerFeedbackInfo;
import com.go.where.manager.service.CustomerFeedbackService;

@Service("customerFeedbackService")
public class CustomerFeedbackServiceImpl implements CustomerFeedbackService {

	@Resource(name = "customerFeedbackDao")
	private CustomerFeedbackDao customerFeedbackDao;

	@Override
	public Pagination<CustomerFeedbackInfo> queryPage(
			CustomerFeedbackInfo customerInfo) {
		Integer count = customerFeedbackDao.totalCount(customerInfo);
		customerInfo.calculate();
		List<CustomerFeedbackInfo> list = customerFeedbackDao
				.queryList(customerInfo);
		Pagination<CustomerFeedbackInfo> page = customerFeedbackDao
				.queryPagination(count, list, customerInfo);
		return page;
	}

}
